import type { Mapping, Option } from "@/components/ProFrom/ProFrom.vue";

const hobbyList: Option[] = [
  {
    label: "唱",
    value: "c",
  },
  {
    label: "跳",
    value: "t",
  },
  {
    label: "rap",
    value: "r",
  },
  {
    label: "篮球",
    value: "l",
  },
];

export const queryFormMap: Mapping[] = [
  { label: "用户名", type: "input", prop: "name" },
  {
    label: "居住地",
    type: "select",
    prop: "city",
    options: ["北京", "NBA"],
    // width: "50%",
    // col: 12,
  },
  {
    label: "爱好",
    type: "checkbox",
    prop: "hobby",
    options: hobbyList,
  },
  { label: "性别", type: "radio", prop: "sex", options: ["男", "女"] },
  {
    label: "练习时长",
    type: "date-range",
    prop: "date",
    col: 10,
  },
];
export const editFormMap: Mapping[] = queryFormMap.map((e) => ({
  label: e.label,
  type: e.type,
  prop: e.prop,
  options: e.options,
  required: true,
}));
